<% for name in [:notice, :warning, :message] %> 
<% if flash[name] %> 
<div id="<%= h "#{name}" %>" class="flash"><%= h "#{flash[name]}" %></div> 
<% end %> 
<% end %>

<% form_tag sessions_path do -%>
<p><label for="login">Login</label><br/>
<%= text_field_tag 'login' %></p>

<p><label for="password">Password</label><br/>
<%= password_field_tag 'password' %></p>

<p><%= submit_tag 'Log in' %></p>

<% if request.remote_ip == '127.0.0.1' \
	|| request.remote_ip == '0:0:0:0:0:0:0:1%0' %> 
<%= link_to 'Register for an account', \
:controller => 'users', :action => 'new' %> 
<% end %> 

<% end -%>